<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../build/react.js"></script>
    <script src="../build/react-dom.js"></script>
    <script src="../build/browser.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
    var WebSite = React.createClass({
        getInitialState: function () {
            return {
                name: '百度',
                link: 'https://www.baidu.com/',
            }
        },
        render: function () {
            return (
                <div>
                    <Name name={this.state.name}/>
                    <Link link={this.state.link}/>
                </div>
            )
        }
    });
    var Name = React.createClass({
        render: function () {
            return (
                <h1>{this.props.name}</h1>
            )
        }
    });
    var Link = React.createClass({
        render: function () {
            return (
                <a href={this.props.link}>{this.props.link}</a>
            );
        }
    })
    ReactDOM.render(
        <WebSite/>,
        document.getElementById('example')
    );
</script>
</body>
</html>